package com.kpmg.datalake.autopackage.service;

import java.io.FileNotFoundException;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.kpmg.datalake.autopackage.vo.ExcelTemplate;
import com.kpmg.datalake.autopackage.vo.TargetTemplateVO;
import com.kpmg.datalake.common.model.ExcelRequest;
import com.kpmg.datalake.common.vo.ServerResponse;
import com.kpmg.datalake.db.model.Project;
import com.kpmg.datalake.db.model.SysUsr;

/**
 * Excel模板管理模块
 * 
 * @author James
 */
public interface ExcelTemplateService {

  /**
   * 新增
   * 
   * @param user user
   * @param newExc newExc
   * @param personalPath personalPath
   * @param project project
   */
  void insertClientManage(SysUsr user, ExcelTemplate newExc, String personalPath, Project project)
      throws InterruptedException, FileNotFoundException;

  /**
   * 修改
   * 
   * @param personalPath personalPath
   * @param project project
   */
  void editClientManage(SysUsr user, ExcelTemplate newExc, String personalPath, Project project)
      throws InterruptedException, FileNotFoundException;

  /**
   * 依据项目ID获取查询请求列表
   * 
   * @param projectId
   * @param searchValue
   * @param orderColumn
   * @param orderDir
   * @param start
   * @param size
   * @return
   */
  List<ExcelRequest> getRequestList(String projectId, String searchValue, String orderColumn,
      String orderDir, int start, int size);

  /**
   * 依据项目ID获取查询请求列表,无分页参数
   * 
   * @param projectId 项目id
   * @return List<ExcelRequest>
   */
  List<ExcelRequest> getRequestList(final String projectId);

  ServerResponse<PageInfo<ExcelTemplate>> qryTargetTemplate(TargetTemplateVO targetTemplateVO);

  ExcelTemplate selectByPrimaryKey(String id);

  List<ExcelTemplate> selectById(String id);

  /**
   * 更新行业模板信息
   * 
   * @param id
   * @return
   */
  ServerResponse<Integer> updateByTplId(ExcelTemplate newExc);

  /**
   * 查询上传任务数
   * 
   * @return
   */
  Integer queryTaskCount();

}
